package com.qiyeji.real_estate.mapper;

import com.qiyeji.real_estate.entity.staff;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

@Mapper
@Repository
public interface staffMapper {
    int deleteByPrimaryKey(String scode);

    int insert(staff record);

    int insertSelective(staff record);

    staff selectByPrimaryKey(String scode);

    int updateByPrimaryKeySelective(staff record);

    int updateByPrimaryKey(staff record);

    // 获得全部员工信息
    List<staff> getAllStaff();

    // 获得每个部门的主管
    List<staff> getCharges(String dcode);

    staff login(String id,String password);

    CopyOnWriteArrayList<staff> getAllStaffForExcel();

    //根据部门编号获取员工
    List<staff> getStaffBydCode(String dCode);

}